package cn.com.api.mapper.base;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiT_user_action;

//DAO
public interface T_user_actionMapperBase {

	//根据id查看
    @Select("SELECT * FROM t_user_action  WHERE action_id = #{action_id}")
	public ApiT_user_action findT_user_actionById(Integer action_id);
	
    //查看数据集
    @Select("SELECT * FROM T_user_action")
	public List<ApiT_user_action> findT_user_actions();
	
	//添加
    @Insert("INSERT INTO t_user_action (parent_id, module_code, action_code, relevance) VALUES (#{parent_id}, #{module_code}, #{action_code}, #{relevance})")
 	@Options(useGeneratedKeys = true, keyProperty = "action_id")
    public int insertT_user_action(ApiT_user_action t_user_action);
  	
	//修改
    @Update("UPDATE t_user_action SET parent_id = #{parent_id}, module_code = #{module_code}, action_code = #{action_code}, relevance = #{relevance} WHERE action_id = #{action_id}")
    public int updateT_user_action(ApiT_user_action t_user_action);
    
    //删除
    @Delete("DELETE FROM t_user_action  WHERE action_id = #{action_id}")
    public int deleteT_user_action(Integer action_id);
 
    // Foreign keys revelant		
		

	//region Indexs revelant
    
    
    
}


